<?php
/**
 * Created by PhpStorm.
 * User: UI
 * Date: 2016/7/6
 * Time: 17:18
 */

function new_addslashes($string){
    if(!is_array($string)){
        return addslashes($string);
    }
    foreach($string as $key => $val){
        $string[$key] = new_addslashes($val);
        return $string;
    }
}